import request from '@/utils/request'

//查询
export function getAllBird(param) {
  return request({
    url: '/bird/findAll',
    method: 'post',
    data: param,
  })
}
//删除
export function deleteBird(param) {
  return request({
    url: `/bird/delete`,
    method: 'delete',
    data: param,
  })
}
//获取选项
export function getOptionForAddBird() {
  return request({
    url: '/bird/findBirdToSelect',
    method: 'get',
  })
}
//添加
export function addBird(param) {
  return request({
    url: '/bird/addBird',
    method: 'post',
    data: param,
  })
}
//更新
export function updateBird(param) {
  return request({
    url: '/bird/update',
    method: 'put',
    data: param,
  })
}
//获取状态
export function getState() {
  return request({
    url: '/birdState/getAll',
    method: 'get',
  })
}
//获取生态类
export function getCategory() {
  return request({
    url: '/birdCategory/getAll',
    method: 'get',
  })
}
//获取目
export function getOrder() {
  return request({
    url: '/birdOrder/getAll',
    method: 'get',
  })
}

//获取科
export function getFamily() {
  return request({
    url: '/birdFamily/getAll',
    method: 'get',
  })
}
//添加鸟类状态
export function addState(param) {
  return request({
    url: '/birdState/add',
    method: 'post',
    data: param,
  })
}
//添加鸟类目
export function addOrder(param) {
  return request({
    url: '/birdOrder/add',
    method: 'post',
    data: param,
  })
}
//添加鸟类生态类
export function addCategory(param) {
  return request({
    url: '/birdCategory/add',
    method: 'post',
    data: param,
  })
}
//添加鸟类科
export function addFamily(param) {
  return request({
    url: '/birdFamily/add',
    method: 'post',
    data: param,
  })
}
//修改鸟类
export function updateState(param) {
  return request({
    url: '/birdState/update',
    method: 'put',
    data: param,
  })
}
//修改鸟类目
export function updateOrder(param) {
  return request({
    url: '/birdOrder/update',
    method: 'put',
    data: param,
  })
}
//修改鸟类生态类
export function updateCategory(param) {
  return request({
    url: '/birdCategory/update',
    method: 'put',
    data: param,
  })
}
//修改鸟类科
export function updateFamily(param) {
  return request({
    url: '/birdFamily/update',
    method: 'put',
    data: param,
  })
}
//删除鸟类
export function deleteState(param) {
  return request({
    url: '/birdState/delete',
    method: 'delete',
    data: param,
  })
}
//删除鸟类目
export function deleteOrder(param) {
  return request({
    url: '/birdOrder/delete',
    method: 'delete',
    data: param,
  })
}
//删除鸟类生态类
export function deleteCategory(param) {
  return request({
    url: '/birdCategory/delete',
    method: 'delete',
    data: param,
  })
}
//删除鸟类科
export function deleteFamily(param) {
  return request({
    url: '/birdFamily/delete',
    method: 'delete',
    data: param,
  })
}
